<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        body{
            margin:0
        }
        .box{
            width: 400px;
            height: 400px;
            background-color: rgb(104, 62, 62);
            border:1px solid red
            /* padding-top:1px; */
            
        }
        .b1{
            width: 100px;
            height: 100px;
            background-color: rgb(12, 99, 87);
            /* border:1px solid transparent; */
            /* margin-top:50px; */
            margin-left:10px;
        }
        .box1{
            margin-bottom: 30px;
        }
        .box2{
            margin-top:40px;
        }
    </style>
</head>
<body>
    <h2>外边距重叠造成外边距传递</h2>
    <div class="box">
        <!-- 一个文字 -->
        <div class="b1"></div>
    </div>
    <h2>外边距叠加</h2>
    <div class="box box1">box1</div>
    一
    <div class="box box2">box2</div>
</body>
</html>